package com.platform.provider.service.impl;

import com.platform.common.bean.OrderInfo;
import com.platform.provider.mapper.OrderInfoMapper;
import com.platform.provider.service.QueryOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QueryOrderInfoServiceImpl implements QueryOrderInfoService {

    @Autowired
    private OrderInfoMapper orderInfoMapper;

    @Override
    public OrderInfo queryOrderInfo(Long orderId) {
        return orderInfoMapper.selectByPrimaryKey(orderId);
    }

    @Override
    public int insertOrderInfo(OrderInfo orderInfo) {
        return orderInfoMapper.insert(orderInfo);
    }

    @Override
    public OrderInfo queryOrderInfoByShardingKey(Long orderId, Long userId) {
        return orderInfoMapper.selectByShardingKey(orderId, userId);
    }


}
